all: librvm.a basic cleanmSeg

test1:	test1.c librvm.a cleanmSeg
	g++ -g -o test1 test1.c rvm.a

test2:	test2.c librvm.a cleanmSeg
	g++ -g -o test2 test2.c rvm.a

test3:	test3.c librvm.a cleanmSeg
	g++ -g -o test3 test3.c rvm.a

cleanmSeg: 
	rm -rf rvm_segments/

librvm.a: rvm.o
	ar cr rvm.a rvm.o 

rvm.o: rvm.h rvm.cpp
	g++ -c -g rvm.h rvm.cpp

basic:	basic.c librvm.a cleanmSeg
	g++ -g -o basic basic.c rvm.a

abort:  abort.c librvm.a cleanmSeg
	g++ -g -o abort abort.c rvm.a

multi:  multi.c librvm.a cleanmSeg
	g++ -g -o multi multi.c rvm.a

multi-abort:  multi-abort.c librvm.a cleanmSeg
	g++ -g -o multi-abort multi-abort.c rvm.a

truncate:  truncate.c librvm.a cleanmSeg
	g++ -g -o truncate truncate.c rvm.a

clean:
	rm *.a; rm *.o
